<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');


    
/**
* returns the thumbnail for $filename by adding THUMBNAIL_SUFFIX to the filename
* 
* @access protected 
* @param source 
* @param search 
* @return string 
*/
if ( ! function_exists('thumbnail'))
{
 	
	function thumbnail($path="")
	{
	
        $last_index = strrpos($path, "/");

        if ($last_index == FALSE) $index=0;
        else $index=$last_index+1;

        $thumb = substr_replace($path, THUMBS_FOLDER, $index, 0);

        return reduce_double_slashes($thumb);


/*
        if($filename==NULL || $filename==FALSE || trim($filename)=="")
            return FALSE;

        $fileExt = strrchr($filename, ".");
        $new_filename = substr_replace($filename, THUMBNAIL_SUFFIX, -(strlen($fileExt))) . $fileExt;

        return $new_filename;
*/
	
	}
}

/* End of file order_helper.php */
/* Location: ./system/application/helpers/string_helper.php */